package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.project.bean.ClientBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface IClientMapper extends BaseMapper<ClientBean> {
    @Select("SELECT tc.* FROM t_client tc,t_sell ts WHERE " +
            "tc.pk_clientId = ts.fk_clientId AND ts.pk_sellId = #{id}")
    @ResultMap("clientMapper")
    ClientBean findCli(Integer id);

    ClientBean findBySaleId(Integer saleId);
}
